package chixing.day06.homework;

/**
 * 访问修饰符的作用
 * public: 修饰的方法属性 任何类都可以访问
 * private: 本类可以访问
 * 1，提高类的源信息的安全性 属性不被暴露出去
 * 2，降低耦合性，该类的属性只归本类自己管理
 */
public class Student {
    private int stuId;
    private String StuName;
    private char stuGender;

    public Student(int stuId, char stuGender, String stuName) {
        this.stuId = stuId;
        this.stuGender = stuGender;
        this.StuName = stuName;
    }

    public int getStuId() {
        return stuId;
    }

    public void setStuId(int stuId) {
        this.stuId = stuId;
    }

    public String getStuName() {
        return StuName;
    }

    public void setStuName(String stuName) {
        StuName = stuName;
    }

    public char getStuGender() {
        return stuGender;
    }

    public void setStuGender(char stuGender) {
        this.stuGender = stuGender;
    }
    public void study(){
        System.out.println(this.StuName+"学习");
    }
    public void playGame(){
        System.out.println(this.StuName+"玩游戏");
    }
    //省略无参构造函数
public Student() {

}
}